/**
 *    \file        AKBasicSoundProvider.m
 *
 *    \section  desc_sec Description
 *    Description 
 *
 *
 *  \if copyright
 *    Copyright:    (c) 2008 FileMaker, Inc. All rights reserved.
 *
 *    FILEMAKER CONFIDENTIAL
 *    This file includes unpublished proprietary source code of FileMaker, Inc.
 *    The copyright notice above does not evidence any actual or intended publication
 *    of such source code.
 *  \endif
 *    
 *  \section hist_sec Change History:
 *
 *    -     7/28/08        BC        Created this file
 *
 *  <hr>
 * \addtogroup AnimalKingdom
 */

#import "AKBasicSoundProvider.h"

@implementation AKBasicSoundProvider

#pragma mark -
#pragma mark Plug-in properties

- (NSString*)gameName	{ return AKPlugInAnyGame; }
- (NSString*)version	{ return AKMultimediaPlugInAnyVersion; }

#pragma mark -
#pragma mark Protocol method

- (NSSound*)soundForEvent:(NSString*)eventTypeName piece:(AKPiece)aPiece info:(NSDictionary*)infoDict {
	NSSound *retVal = nil;
	
	if ([eventTypeName isEqualToString:kAKEventPieceActivated]) {
		retVal = [NSSound soundNamed:@"Pop"];
	} else if ([eventTypeName isEqualToString:kAKEventPieceDeactivated]) {
		retVal = nil;
	} else if ([eventTypeName isEqualToString:kAKEventPieceCreated]) {
		retVal = [NSSound soundNamed:@"Hero"];
	} else if ([eventTypeName isEqualToString:kAKEventPieceMoved]) {
		retVal = [NSSound soundNamed:@"Submarine"];
	} else if ([eventTypeName isEqualToString:kAKEventPieceEliminated]) {
		retVal = [NSSound soundNamed:@"Glass"];
	} else if ([eventTypeName isEqualToString:kAKEventGameStarted]) {
		retVal = [NSSound soundNamed:@"Glass"];
	} else if ([eventTypeName isEqualToString:kAKEventPlayerWon]) {
		retVal = [NSSound soundNamed:@"Sosumi"];
	} else if ([eventTypeName isEqualToString:kAKEventPlayerLost]) {
		retVal = [NSSound soundNamed:@"Frog"];
	}
	
	return retVal;
}

@end
